package it.greg.findparty.android.persistence;

import android.content.Context;
import android.content.SharedPreferences;

public class SettingSaver {
	
	private final String SETTINGS_FILE_NAME = "Settings";
	private SharedPreferences settings;
	private Context context;
	
	public SettingSaver(Context c){
		this.context = c;
		this.settings = this.context.getSharedPreferences(SETTINGS_FILE_NAME, this.context.MODE_PRIVATE);
	}
	
	public void saveSettingString(String key, String value){
		SharedPreferences.Editor editor = this.settings.edit();
		editor.putString(key, value);
		editor.commit();
	}
	
	public String getSettingString(String key){
		return this.settings.getString(key, null);
	}

}
